package com.beiding.dao;

import com.beiding.pojo.StaticResource;
import org.bson.Document;
import org.springframework.data.mongodb.repository.MongoRepository;

public interface ResourceDao extends MongoRepository<StaticResource,String> ,ResourceOperations<StaticResource>{
    default void claim(String resourceId,String holderId,boolean claimed){
        Document document = new Document();
        document.put("claimed", claimed);
        document.put("tenant", holderId);
        updateFields(resourceId,document);
    };
}
